import {expertList, IExpert} from "@/api/expert.ts";
import useTable from "@/hooks/useTable.ts";
import ExpertTable from "@/components/tiktok/expert/ExpertTable.tsx";
import ExpertSearch from "@/components/tiktok/expert/ExpertSearch.tsx";
import {useEffect} from "react";

const Expert = () => {
    const { dataSource, loading, getList } = useTable<IExpert, null>(expertList, null)
    useEffect(() => {
        getList()
    }, []);
    return (
        <div className='main'>
            <ExpertSearch getList={getList} />
            <ExpertTable dataSource={ dataSource } loading={ loading } />
        </div>
    )
}

export default Expert